#pragma once

namespace vex { namespace functional {
    template<class TSignature> 
    struct result;

    template<class TRet> 
    struct result<TRet ()> {
        typedef TRet type;
    };

    template<class TRet, class TArg1> 
    struct result<TRet (TArg1)> {
        typedef TRet type;
    };

    template<class TRet, class TArg1, class TArg2> 
    struct result<TRet (TArg1, TArg2)> {
        typedef TRet type;
    };

    template<class TRet, class TArg1, class TArg2, class TArg3> 
    struct result<TRet (TArg1, TArg2, TArg3)> {
        typedef TRet type;
    };

    template<class TRet, class TArg1, class TArg2, class TArg3, class TArg4> 
    struct result<TRet (TArg1, TArg2, TArg3, TArg4)> {
        typedef TRet type;
    };

    template<class TRet, class TArg1, class TArg2, class TArg3, class TArg4, class TArg5> 
    struct result<TRet (TArg1, TArg2, TArg3, TArg4, TArg5)> {
        typedef TRet type;
    };
}}